package com.translate.web.param;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import com.translate.web.constant.ValidateCondtionAndMessage;
import com.translate.web.param.contract.IProductCategoryAddParam;

public class ProductCategoryAddParam implements IProductCategoryAddParam {
	// 分类名称
	@NotNull
	@Pattern(regexp = ValidateCondtionAndMessage.CHINESE_ENGLISH_NUMBER_UNDERLINE_BY_SERIESDESCRIPTION, message = ValidateCondtionAndMessage.CHINESE_ENGLISH_NUMBER_UNDERLINE_BY_SERIESDESCRIPTION_MSG)
	private String name;
// 状态 0弃用 1 启用
	@NotNull
	@Min(value = ValidateCondtionAndMessage.MIN_STATUS, message = ValidateCondtionAndMessage.MIN_STATUS_MSG)
	@Max(value = ValidateCondtionAndMessage.MAX_STATUS, message = ValidateCondtionAndMessage.MAX_STATUS_MSG)
	private Byte status;
// 排序
	@NotNull
	@Min(value = ValidateCondtionAndMessage.MIN_ID, message = ValidateCondtionAndMessage.MIN_ID_MSG)
	private Integer sort;
// 父级编号
	@NotNull
	@Min(value = ValidateCondtionAndMessage.ZERO, message = ValidateCondtionAndMessage.ZERO_MSG)
	private Integer pid;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name == null ? null : name.trim();
	}

	public Byte getStatus() {
		return status;
	}

	public void setStatus(Byte status) {
		this.status = status;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public Integer getPid() {
		return pid;
	}

	public void setPid(Integer pid) {
		this.pid = pid;
	}

}